package com.disgnpattern.learn.chapter8.simple;

import com.disgnpattern.learn.chapter8.Leifeng;

/**
 * @author dxy
 * @version 1.0
 * @date 2021/10/22 16:46
 * @decripton 简单工厂测试
 * @mail victorydeng@163.com
 */
public class SimpleTest {
    public static void main(String[] args) {
        LeifengFactory factory = new LeifengFactory();
        Leifeng student1 = factory.create("大学生");
        student1.sweep();
        Leifeng student2 = factory.create("大学生");
        student2.buyRice();
        Leifeng student3 = factory.create("大学生");
        student3.wash();
        Leifeng volunteer = factory.create("志愿者");
        volunteer.wash();

    }
}
